/*     */ package com.umeng.common.net;
/*     */ 
/*     */ import com.umeng.common.Log;
/*     */ import com.umeng.common.util.h;
/*     */ import java.io.IOException;
/*     */ import java.util.Iterator;
/*     */ import java.util.Map;
/*     */ import java.util.Random;
/*     */ import java.util.Set;
/*     */ import org.apache.http.HttpResponse;
/*     */ import org.apache.http.StatusLine;
/*     */ import org.apache.http.client.ClientProtocolException;
/*     */ import org.apache.http.client.HttpClient;
/*     */ import org.apache.http.client.methods.HttpGet;
/*     */ import org.apache.http.client.methods.HttpUriRequest;
/*     */ import org.apache.http.impl.client.DefaultHttpClient;
/*     */ import org.apache.http.params.BasicHttpParams;
/*     */ import org.apache.http.params.HttpConnectionParams;
/*     */ import org.apache.http.params.HttpParams;
/*     */ 
/*     */ class e
/*     */   implements Runnable
/*     */ {
/*     */   e(d paramd, String[] paramArrayOfString, boolean paramBoolean, Map paramMap)
/*     */   {
/*     */   }
/*     */ 
/*     */   public void run()
/*     */   {
/* 298 */     int i = 1;
/* 299 */     int j = -2;
/* 300 */     int k = new Random().nextInt(1000);
/* 301 */     if (this.b == null) {
/* 302 */       Log.a(d.a(), k + "service report: urls is null");
/* 303 */       return;
/*     */     }
/* 305 */     for (String str1 : this.b)
/*     */     {
/* 307 */       String str2 = h.a();
/* 308 */       String str3 = str2.split(" ")[0];
/* 309 */       String str4 = str2.split(" ")[1];
/*     */ 
/* 311 */       long l = System.currentTimeMillis();
/*     */ 
/* 313 */       StringBuilder localStringBuilder = new StringBuilder(str1);
/* 314 */       localStringBuilder.append("&data=").append(str3);
/* 315 */       localStringBuilder.append("&time=").append(str4);
/* 316 */       localStringBuilder.append("&ts=").append(l);
/* 317 */       if (this.c)
/* 318 */         localStringBuilder.append("&action_type=").append(i);
/*     */       else
/* 320 */         localStringBuilder.append("&action_type=").append(j);
/*     */       Object localObject1;
/*     */       Object localObject3;
/*     */       Object localObject2;
/* 321 */       if (this.d != null) {
/* 322 */         localObject1 = this.d.keySet();
/* 323 */         for (localObject3 = ((Set)localObject1).iterator(); ((Iterator)localObject3).hasNext(); ) { localObject2 = (String)((Iterator)localObject3).next();
/* 324 */           localStringBuilder.append("&").append((String)localObject2).append("=").append((String)this.d.get(localObject2)); }  } try { Log.a(d.a(), 
/* 329 */           k + ": service report:\tget: " + 
/* 330 */           localStringBuilder.toString());
/* 331 */         localObject1 = new HttpGet(localStringBuilder.toString());
/* 332 */         localObject2 = new BasicHttpParams();
/* 333 */         HttpConnectionParams.setConnectionTimeout((HttpParams)localObject2, 
/* 334 */           10000);
/* 335 */         HttpConnectionParams.setSoTimeout((HttpParams)localObject2, 20000);
/* 336 */         localObject3 = new DefaultHttpClient(
/* 337 */           (HttpParams)localObject2);
/* 338 */         HttpResponse localHttpResponse = ((HttpClient)localObject3).execute((HttpUriRequest)localObject1);
/*     */ 
/* 340 */         Log.a(d.a(), k + 
/* 341 */           ": service report:status code:  " + 
/* 342 */           localHttpResponse.getStatusLine().getStatusCode());
/* 343 */         if (localHttpResponse.getStatusLine().getStatusCode() != 200); } catch (ClientProtocolException localClientProtocolException) { Log.c(d.a(), 
/* 348 */           k + 
/* 349 */           ": service report:\tClientProtocolException,Failed to send message." + 
/* 350 */           str1, localClientProtocolException);
/*     */       } catch (IOException localIOException) {
/* 352 */         Log.c(d.a(), 
/* 353 */           k + 
/* 354 */           ": service report:\tIOException,Failed to send message." + 
/* 355 */           str1, localIOException);
/*     */       }
/*     */     }
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\umeng_sdk.jar
 * Qualified Name:     com.umeng.common.net.e
 * JD-Core Version:    0.6.2
 */